package com.webbei.Backstage.action;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.webbei.Backstage.service.BackstateSer;
import com.webbei.pojo.Brands;
import com.webbei.pojo.Products;

public class GetAllProductsAction {
	private BackstateSer bao;
	private List<Products> product;
	public String execute(){
		product=bao.getAllProducts();
		System.out.println(product.size()+"-------GetAllProductAction");
		
		HttpServletResponse response=ServletActionContext.getResponse();
		response.setHeader("Pragma","No-cache");
		response.setHeader("Cache-Control","no-cache"); 
		response.setDateHeader("Expires", 0);
		return "success";
	}
	public void setBao(BackstateSer bao) {
		this.bao = bao;
	}
	public List<Products> getProduct() {
		return product;
	}
	public void setProduct(List<Products> product) {
		this.product = product;
	}
	
}
